package service;

import entity.*;

import java.sql.SQLException;
import java.util.List;

/**
 * Created by Administrator on 2017/11/14.
 */
public interface BaseGoodsService {
    //热销产品查询
    public List<BaseGoodsEntity> query()throws ClassNotFoundException,SQLException;
    //最新上架查询
    public List<BaseGoodsEntity> queryNew()throws ClassNotFoundException,SQLException;
    //查询货物详情
    public DetailEntity queryDetails(long goodsid)throws ClassNotFoundException,SQLException;
    //查询地区
    public List<AreaEntity> queryArea()throws ClassNotFoundException,SQLException;
    //注册
    public int register(String userAccount,String userPassword)throws ClassNotFoundException,SQLException;
    //登录
    public UserEntity login(String userAccount,String userPwd)throws ClassNotFoundException,SQLException;
    /**
     * 购物车部分
     */
    //查询商品信息（id，名字，价格，图片，数量）
    public List<GoodsEntity> queryAll()throws ClassNotFoundException,SQLException;
    //根据商品的id查询商品信息
    public GoodsEntity queryById(long goodsId)throws ClassNotFoundException,SQLException;
    //修改数量
    public int updateCount(long goodsId,int counts)throws ClassNotFoundException,SQLException;
    //修改数量时的查询
    public GoodsEntity queryCount(long goodsId)throws ClassNotFoundException,SQLException;
}
